package stu.khy.dao.impl;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate5.HibernateTemplate;
import org.springframework.stereotype.Repository;

import stu.khy.dao.ClaimVoucherDao;
import stu.khy.entity.ClaimVoucher;
import stu.khy.entity.Employee;
import stu.khy.util.PaginationSupport;
@Repository
public class ClaimVoucherDaoImpl extends BaseHibernateDaoSupport<ClaimVoucher> implements ClaimVoucherDao {

	@Autowired
	private HibernateTemplate hibernateTemplate;
	
	public void save2(ClaimVoucher claimvoucher) {
		hibernateTemplate.save(claimvoucher);
		hibernateTemplate.flush();
	}

	@Override
	public PaginationSupport<ClaimVoucher> getClaimVoucherPage(String createSn, String status, Date startDate,
			Date endDate, Integer pageNo, Integer pageSize) {
		
		
		return null;
	}

	@Override
	public ClaimVoucher findClaimVoucherById(Long id) {
		return (ClaimVoucher) hibernateTemplate.findByNamedParam("rom ClaimVoucher where id=:id", "id", id).get(0);
	}


}
